# Importing Project Account Records in a CSV

Imports up to 5000 project accounting records with a
[csv file](https://app.mavenlink.com/sample_import_project_accounting_records.csv)
with a .txt or .csv extension.
Each row/line is a record, and each record has attributes. Headers
indicate which attributes are being specified for imported records.
Headers can include:
* **Project ID** (required)
* **Story ID**
* **Role ID**
* **User ID**
* **Type** (recommended)
* **Period Start Date** (required)
* **Period End Date** (required)
* **Contract Date**
* **Currency** (required)
* **Revenue Method**
* **Amount**
* **Amount To Date**
* **Forecast**
* **Budget**
* **Cost**
* **Cost to Date**
* **Cost EAC**
* **Fees**
* **Labor Type**
* **Hours**
* **Hours EAC**
* **Hours ETC**
* **Total Estimated Hours**
* **Total Hours to Date**
* **Percent Complete**
* **Status**
* **Service Type**
* **Description**
* **Notes**

Only **Project ID**, **Period Start Date**, **Period End Date**,
and **Currency** are required for a csv import. But when it is not specified,
**Type** defaults to `Recognition`. Other valid values for **Type** are
`Baseline`, `Earned Value`, `Earned Value Forecasting`, and `Forecasting`.
This endpoint returns structured Project Accounting Records objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `project_accounting_records` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: POST /project_accounting_records/import_csv
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `role` (Role) - Includes the ID of the role associated with the record.
- `story` (Story) - Includes the ID of the task related to the record.
- `user` (User) - Includes the ID(s) of user(s) associated with the record
                    (e.g. who created the record, who the record was created for, etc.).
- `workspace` (Workspace) - Includes the ID of the project the record belongs to.

## Response 200:

  - `200` (unknown)
    Project Accounting Records has been created.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `project_accounting_records` (object)

  - `external_references` (object)

  - `workspaces` (object)

  - `stories` (object)

  - `roles` (object)

  - `users` (object)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403:

  - `403` (unknown)
    Forbidden request

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404:

  - `404` (unknown)
    Page Not Found

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503:

  - `503` (unknown)
    Service is unavailable

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

